/* 自定义样式 */

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* 自定义类 */
.animate-fadeIn {
  animation: fadeIn 1s ease-out forwards;
}

.animate-slideInRight {
  animation: slideInRight 0.5s ease-out forwards;
}

.animate-pulse-slow {
  animation: pulse 3s infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* 渐变背景 */
.bg-gradient-custom-1 {
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #d946ef);
}

.bg-gradient-custom-2 {
  background: linear-gradient(135deg, #3b82f6, #2dd4bf, #4ade80);
}

.bg-gradient-custom-3 {
  background: linear-gradient(135deg, #f97316, #f59e0b, #facc15);
}

/* 玻璃效果 */
.glassmorphism {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glassmorphism-dark {
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 自定义阴影 */
.shadow-custom-1 {
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
}

.shadow-custom-2 {
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
}

.shadow-glow {
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

.shadow-glow-green {
  box-shadow: 0 0 15px rgba(52, 211, 153, 0.5);
}

.shadow-glow-orange {
  box-shadow: 0 0 15px rgba(249, 115, 22, 0.5);
}

/* 自定义边框 */
.border-gradient-purple {
  border: 2px solid transparent;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  background-image: linear-gradient(to right, white, white), 
                    linear-gradient(to right, #6366f1, #d946ef);
}

.border-gradient-blue {
  border: 2px solid transparent;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  background-image: linear-gradient(to right, white, white), 
                    linear-gradient(to right, #3b82f6, #2dd4bf);
}

/* 按钮样式 */
.btn-custom {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-custom::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.4s ease;
}

.btn-custom:hover::before {
  left: 100%;
}

/* 卡片悬停效果 */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-10px);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* 导航栏滚动效果 */
.navbar-scrolled {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 响应式字体大小 */
.text-responsive {
  font-size: clamp(1rem, 5vw, 2.5rem);
}

/* 自定义表单样式 */
.input-custom {
  transition: all 0.3s ease;
  border: 2px solid #e5e7eb;
}

.input-custom:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.input-custom.error {
  border-color: #ef4444;
}

.input-custom.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* 标签样式 */
.tag {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.tag-success {
  background-color: rgba(52, 211, 153, 0.2);
}

/* --- 导航栏激活菜单项样式 --- */

/* 默认状态 (非滚动，深色背景) */
.ant-layout-header:not(.navbar-scrolled) .ant-menu-horizontal > .ant-menu-item-selected > .ant-menu-title-content,
.ant-layout-header:not(.navbar-scrolled) .ant-menu-item-selected .ant-menu-item-icon {
  color: #fde047 !important; /* 亮黄色文字 */
}

.ant-layout-header:not(.navbar-scrolled) .ant-menu-horizontal > .ant-menu-item-selected::after {
  border-bottom-color: #fde047 !important; /* 亮黄色下边框 */
  border-bottom-width: 3px !important;
  left: 10px;
  right: 10px;
}

/* 滚动后状态 (白色背景) */
.navbar-scrolled .ant-menu-horizontal > .ant-menu-item-selected > .ant-menu-title-content,
.navbar-scrolled .ant-menu-item-selected .ant-menu-item-icon {
  color: #8b5cf6 !important; /* 主题紫色文字 */
}

.navbar-scrolled .ant-menu-horizontal > .ant-menu-item-selected::after {
  border-bottom-color: #8b5cf6 !important; /* 主题紫色下边框 */
  border-bottom-width: 3px !important;
  left: 10px;
  right: 10px;
}

/* 抽屉菜单激活项 */
.ant-drawer .ant-menu-vertical .ant-menu-item-selected {
  background-color: #f0f5ff !important;
}

.ant-drawer .ant-menu-vertical .ant-menu-item-selected > .ant-menu-title-content a {
  color: #6366f1 !important;
  font-weight: 600;
}
/* --- 结束 --- */

.tag-warning {
  background-color: rgba(245, 158, 11, 0.2);
  color: #d97706;
}

.tag-danger {
  background-color: rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

/* 3D按钮效果 */
.btn-3d {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 0 #4338ca;
}

.btn-3d:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #4338ca;
}

/* 图片悬停效果 */
.img-hover-zoom {
  overflow: hidden;
}

.img-hover-zoom img {
  transition: transform 0.5s ease;
}

.img-hover-zoom:hover img {
  transform: scale(1.1);
}

/* 文本渐变效果 */
.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.text-gradient-purple {
  background-image: linear-gradient(to right, #6366f1, #d946ef);
}

.text-gradient-blue {
  background-image: linear-gradient(to right, #3b82f6, #2dd4bf);
}

.text-gradient-orange {
  background-image: linear-gradient(to right, #f97316, #f59e0b);
} 